Skip to content

feat: add Stainless SDK config and misc cleanups#132

Open
pengying wants to merge 1 commit into01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_splitfrom
01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split
Open

feat: add Stainless SDK config and misc cleanups#132
pengying wants to merge 1 commit into01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_splitfrom
01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Jan 24, 2026

Grid API SDK Configuration

  • Add .stainless/stainless.yml and workspace.json for SDK generation
  • Add AllErrors schema to properly handle error types
  • Replace Error schema references with GridError
  • Fix phone number format in UltimateBeneficialOwner to include '+' prefix
  • Update .redocly.lint-ignore.yaml with additional rule exceptions
  • Fix internal_accounts schema reference path

Copy link
Contributor Author

pengying commented Jan 24, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 24, 2026

Greptile Overview

Greptile Summary

This PR adds Stainless SDK configuration for generating TypeScript and Kotlin SDKs from the Grid API OpenAPI specification. The changes include SDK generation configuration, error handling improvements, and several bug fixes.

Major changes:

  • Added .stainless/stainless.yml with comprehensive SDK configuration including resource mappings, authentication settings, pagination, and error handling
  • Added .stainless/workspace.json pointing to mintlify/openapi.yaml as the source spec
  • Introduced AllErrors union schema to enable proper typed error handling in generated SDKs via discriminated unions
  • Renamed Error schema references to GridError for consistency
  • Fixed phoneNumber example in UltimateBeneficialOwner to include '+' prefix matching E.164 format pattern
  • Corrected InternalAccount schema reference path from users/ to customers/ directory
  • Added lint exceptions for the new AllErrors schema and Quote-related properties

All changes are clean, well-structured, and properly integrated with the existing OpenAPI schema architecture.

Confidence Score: 5/5

  • This PR is safe to merge with no concerns
  • All changes are configuration and documentation related with no runtime code. The SDK configuration is comprehensive and follows Stainless best practices. Schema fixes are correct (verified InternalAccount exists in customers/ directory, phone format fix matches validation pattern). The bundled openapi.yaml files are auto-generated and consistent with source changes.
  • No files require special attention

Important Files Changed

Filename Overview
.stainless/stainless.yml New Stainless SDK configuration file for TypeScript and Kotlin SDK generation with proper resource mapping and authentication settings
.stainless/workspace.json New workspace configuration pointing to mintlify/openapi.yaml as the source spec
openapi/openapi.yaml Added AllErrors union schema for SDK error handling configuration
openapi/paths/internal-accounts/internal_accounts.yaml Fixed InternalAccount schema reference path from users/ to customers/ directory

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Stainless as Stainless SDK Generator
    participant OpenAPI as OpenAPI Spec
    participant SDK as Generated SDK
    participant API as Grid API

    Note over Dev,Stainless: SDK Configuration Phase
    Dev->>Stainless: Configure stainless.yml<br/>(resources, auth, pagination)
    Dev->>Stainless: Configure workspace.json<br/>(points to mintlify/openapi.yaml)
    
    Note over Stainless,OpenAPI: Schema Processing Phase
    Stainless->>OpenAPI: Read mintlify/openapi.yaml
    OpenAPI-->>Stainless: AllErrors union schema<br/>(Error400-501)
    OpenAPI-->>Stainless: GridError base schema
    Stainless->>Stainless: Transform AllErrors via<br/>splitSchemasByEnumProperty
    
    Note over Stainless,SDK: SDK Generation Phase
    Stainless->>SDK: Generate TypeScript SDK<br/>(grid package)
    Stainless->>SDK: Generate Kotlin SDK<br/>(com.grid.api)
    
    Note over SDK,API: Runtime Usage
    Dev->>SDK: Use generated client<br/>(BasicAuth credentials)
    SDK->>API: Make API request
    API-->>SDK: Error response (400-500)
    SDK->>SDK: Map to typed error<br/>(using discriminator: code)
    SDK-->>Dev: Typed GridError subclass
Loading

@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from 6432728 to e5749d2 Compare January 27, 2026 01:29
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 21d334e to f90918a Compare January 27, 2026 01:29
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from e5749d2 to a27f6e6 Compare January 27, 2026 05:19
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from f90918a to c6b215b Compare January 27, 2026 05:19
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from a27f6e6 to a1379cd Compare January 27, 2026 05:24
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from c6b215b to 6464d8a Compare January 27, 2026 05:25
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from a1379cd to d0f0475 Compare January 27, 2026 20:38
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch 2 times, most recently from 2d0527c to 16c31c5 Compare January 27, 2026 21:19
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch 2 times, most recently from 94a379a to c72b46f Compare January 27, 2026 23:54
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 16c31c5 to 20ea4a3 Compare January 27, 2026 23:54
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from c72b46f to 99a29c9 Compare January 27, 2026 23:57
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 20ea4a3 to d1566ae Compare January 27, 2026 23:57
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from 99a29c9 to d8d7c4d Compare January 28, 2026 00:08
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch 2 times, most recently from 7324f44 to 3aa1250 Compare January 28, 2026 00:15
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from 1c31c37 to fbf418e Compare January 28, 2026 00:27
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 3aa1250 to f054ac0 Compare January 28, 2026 00:27
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from fbf418e to 48e70c8 Compare January 28, 2026 04:32
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from f054ac0 to 2ac3b42 Compare January 28, 2026 04:32
- Add .stainless/stainless.yml and workspace.json
- Add AllErrors schema and remove retry quotes endpoint
- Update .redocly.lint-ignore.yaml
- Fix UltimateBeneficialOwner phone format
- Fix internal_accounts ref path
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 2ac3b42 to a8f4844 Compare February 5, 2026 16:43
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from 48e70c8 to 00ab46b Compare February 5, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant